package com.quan.entity;

//import com.baomidou.mybatisplus.annotation.IdType;
//import com.baomidou.mybatisplus.annotation.TableId;
//import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.Data;
import lombok.experimental.Accessors;
import tk.mybatis.mapper.annotation.KeySql;

import javax.persistence.Id;
import javax.persistence.Table;

@Data
@Table(name = "student")
public class Student {

    /**
     * 主键自增  Id
     */
    @Id
    @KeySql(useGeneratedKeys = true)
    private Integer id;
    /**
     * 姓名
     */
    private String name;
    /**
     * 薪水
     */
    @JsonIgnore
    private String salary;

    public Student(String name, String salary) {
        this.name = name;
        this.salary = salary;
    }

    public Student() {
    }

    public Student(Integer id, String name, String salary) {
        this.id = id;
        this.name = name;
        this.salary = salary;
    }
}
